use serde::{Deserialize, Serialize};
use utoipa::{IntoParams, ToSchema};

#[derive(Debug, ToSchema, Deserialize, Serialize, IntoParams)]
#[serde(rename_all = "camelCase")]
pub struct CategoryPageQueryDTO {
    pub name: Option<String>,
    pub r#type: Option<i32>,
    pub page: usize,
    pub page_size: usize,
}

#[derive(Debug, ToSchema, Deserialize, Serialize, IntoParams)]
pub struct CategoryDTO {
    pub id: Option<i64>,
    pub r#type: Option<i32>,
    pub name: Option<String>,
    pub sort: Option<i32>,
    pub status: Option<i32>,
}

#[derive(Debug, ToSchema, Deserialize, Serialize, IntoParams)]
#[serde(rename_all = "camelCase")]
pub struct ListCategoryId {
    pub category_id: i64,
}

#[derive(Debug, ToSchema, Deserialize, Serialize, IntoParams)]
#[serde(rename_all = "camelCase")]
pub struct DeleteByID {
    pub category_id: i64,
}

#[derive(Debug, ToSchema, Deserialize, Serialize, IntoParams)]
#[serde(rename_all = "camelCase")]
pub struct QueryByType {
    pub r#type: i32,
}
